package com.tj.collection.enums;

/**
 * Created with IntelliJ IDEA.
 * User: pavan
 * Date: 2019/8/20
 * Time: 上午11:26
 */
public enum CollectionConclusionEnum {

    NO_DEAL(0, "No deal"),
    BE_WILLING(1, "Intentional"),
    UNWILLING(2, "No Intention");

    private Integer type;

    private String desc;

    CollectionConclusionEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static CollectionConclusionEnum getEnum(Integer type) {
        for (CollectionConclusionEnum e : CollectionConclusionEnum.values()) {
            if (e.getType().equals(type)) {
                return e;
            }
        }
        return null;
    }

    public Integer getType() {
        return type;
    }

    public CollectionConclusionEnum setType(Integer type) {
        this.type = type;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public CollectionConclusionEnum setDesc(String desc) {
        this.desc = desc;
        return this;
    }
}
